﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Knlght.Domain
{
    /// <summary>
    /// 回复对象基类
    /// </summary>
    public abstract class ResponseBase
    {
        /// <summary>
        /// 回复 构造函数
        /// </summary>
        public ResponseBase(bool isSuccess = true, string error = "", int resultCode = ResultCodeConstants.NONE)
        {
            IsSuccess = isSuccess;
            Message = error;
            ResultCode = resultCode;
        }

        /// <summary>
        /// 请求是否成功
        /// </summary>
        public bool IsSuccess { get; set; }
        /// <summary>
        /// 回复附带信息(当操作错误时，回复错误信息)
        /// </summary>
        public string Message { get; set; }
        /// <summary>
        /// 回复状态码
        /// </summary>
        public int ResultCode { get; set; }
    }
}
